{extend name="public:base" /}
{block name="theme"}菜单管理{/block}
{block name="small_theme"}菜单列表{/block}
{block name="breadcrumb"}
<li><a href="{:url('index')}">菜单列表</a></li>
<li class="active">菜单首页</li>
{/block}
{block name="content"}
<link rel="stylesheet" href="__CSS__/indexcommon.css">
<div class="row" style="padding:15px;">
    <div class="col-xs-12">
        <div class="box box-list">
            <div class="box-header" data-original-title="" style="height: 40px;">
                <a href="{:url('add')}" class="btn"><h2 style="margin-top: 0;"><i class="glyphicon glyphicon-plus"></i> 增加菜单</h2></a>
                <!--<button type="button" class="btn" id="abtn" style="border:none;outline: none;box-shadow: none;"><h2 style="margin-top: 0"><i class="glyphicon glyphicon-tags"></i> 显示选项</h2></button>-->
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding" style="border-bottom: 1px solid #dfdfdf;overflow: hidden;">
                <table class="table table-striped table-bordered table-condensed table-hover">
                    <tr>
                        <th>ID</th>
                        <th>菜单名称</th>
                        <th>节点</th>
                        <th>状态</th>
                        <th>是否检测</th>
                        <th>样式</th>
                        <th>排序</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                    {volist name="authrule" id='vo'}
                    <tr>
                        <td>{$vo.id}</td>
                        <!--<td>{$vo.lefthtml}{$vo.title}</td>-->
                        <td>{$vo._name}</td>
                        <td>{$vo.name}</td>
                        <td>
                            <a class="active-btn" href="{:url('admin/menu/menus_rule_state')}" data-id="{$vo.id}">
                                {$vo.status_text}
                            </a>
                        </td>
                        <td>{$vo.notcheck_text}</td>
                        <td>{notempty name="vo.css"}<i class="fa {$vo.css}"></i>{else/}<i class="fa fa-circle-o"></i>{/notempty}</td>
                        <td>{$vo.sort}</td>
                        <td>{$vo.create_time}</td>
                        <td>
                            <a class="btn btn-nopadding" href="{:url('add',['id'=>$vo['id']])}" title="添加子菜单">
                                <i class="glyphicon glyphicon-plus icon-white"></i>
                            </a>
                            <a class="btn btn-nopadding" href="{:url('rule_copy',['id'=>$vo['id']])}" title="复制">
                                <i class="glyphicon glyphicon-copy icon-white"></i>
                            </a>
                            <a class="btn btn-nopadding" href="{:url('edit',['id'=>$vo['id']])}" title="编辑">
                                <i class="glyphicon glyphicon-edit icon-white"></i>
                            </a>
                            <a class="btn btn-nopadding" href="javascript:opendel('{:url('del',['id'=>$vo['id']])}');" title="真删除">
                                <i class="glyphicon glyphicon-trash icon-white"></i>
                            </a>
                        </td>
                    </tr>
                    {/volist}
                </table>
            </div>
            <!-- /.box-body -->
            <!--<ul class="pagination pagination-centered pagination-list">-->
                <!--<li><a href="#">上一页</a></li>-->
                <!--<li class="active">-->
                    <!--<a href="#">1</a>-->
                <!--</li>-->
                <!--<li><a href="#">2</a></li>-->
                <!--<li><a href="#">3</a></li>-->
                <!--<li><a href="#">4</a></li>-->
                <!--<li><a href="#">下一页</a></li>-->
            <!--</ul>-->
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
    function opendel(url){
        layer.confirm('确定删除？', {
            skin: 'layui-layer-lan', //样式类名
            btn: ['真的','假的'] //按钮
        }, function(){
            $.post(url,function(data){
                if(data.status==2){
                    var ico=2;
                }
                if(data.status==1){
                    var ico=1;
                }
                if(data.status==0){
                    var ico=2;
                }
                layer.msg(data.info, {
                    icon: ico,
                    time:2000,
                },function(){
                    history.go(0);
                });
            });
        }, function(){
            layer.msg('下次不要这么调皮了', {
                icon: 2,
            });
        });
    }
    highlight_subnav("{:url('index')}");
</script>
{/block}